// 基本信息
const topFormRow = [
  {
    elCol: [
      {
        label: "合同编号",
        prop: "contractCode",
        tag: "elInput",
        placeholder: "自动生成",
        disabled: true,
      },
      {
        label: "合同类型",
        prop: "conTypeName",
        tag: "elInput",
        disabled: true,
      },
      {
        label: "经办人",
        prop: "createPersonID",
        tag: "elInput",
        placeholder: "当前登录人",
        disabled: true,
      },
      {
        label: "经办日期",
        prop: "createDate",
        tag: "elDatePicker",
        placeholder: "默认当前可选择修改",
      },
    ],
  },
  {
    elCol: [
      {
        label: "合同名称",
        prop: "conName",
        tag: "elInput",
        span: 12,
      },
      {
        label: "部门",
        prop: "organName",
        tag: "elDialog",
        tooltip: true,
        placeholder: "默认当前登录人",
      },
      {
        label: "业务员",
        prop: "p_PersonName",
        tag: "elDialog",
        placeholder: "默认当前登录人",
      },
    ],
  },
  {
    elCol: [
      {
        label: "合同版本号",
        prop: "versionNo",
        tag: "elInput",
      },
      {
        label: "所属项目",
        prop: "projectName",
        tag: "elDialog",
        placeholder: "选择项目(客户过滤)",
      },
      {
        label: "客户名称",
        prop: "cusName",
        tag: "elDialog",
        placeholder: "选择客户",
      },
      {
        label: "客户联系人",
        prop: "customerContact",
        tag: "elInput",
        placeholder: "选客户自动加载可修改",
      },
    ],
  },
  {
    elCol: [
      {
        label: "客户联系电话",
        prop: "customerPhone",
        tag: "elInput",
        placeholder: "选客户自动加载可修改",
        rulesName: "decimal",
      },
      {
        label: "签订日期",
        prop: "singleDay",
        tag: "elDatePicker",
        placeholder: "请点击选择",
      },
      {
        label: "有效期(起)",
        prop: "beginDay",
        tag: "elDatePicker",
        placeholder: "请点击选择",
      },
      {
        label: "有效期(止)",
        prop: "endDay",
        tag: "elDatePicker",
        placeholder: "请点击选择",
      },
    ],
  },

  {
    elCol: [
      {
        label: "合同原币金额",
        prop: "oriTaxMoney",
        tag: "elInput",
        rules: true,
        rulesName: "decimal",
        disabled: true,
        placeholder: "自动计算",
      },
      {
        label: "合同本币金额",
        prop: "taxMoney",
        tag: "elInput",
        rules: true,
        rulesName: "decimal",
        disabled: true,
        placeholder: "自动计算",
      },
      {
        label: "币种",
        prop: "currencyName",
        tag: "elSelect",
        options: [],
      },
      {
        label: "汇率",
        prop: "exchangeRate",
        tag: "elInput",
        rules: true,
        rulesName: "decimal",
      },
    ],
  },
  {
    elCol: [
      {
        label: "发票类型",
        prop: "invoiceType",
        tag: "elSelect",
        options: [],
        span: 6,
      },
    ],
  },
  // {
  //   elCol: [
  //     {
  //       label: "变更原因",
  //       prop: "changeContent",
  //       tag: "elInput",
  //       span: 24,
  //     },
  //   ],
  // },
  {
    elCol: [
      {
        label: "备注",
        prop: "remark",
        tag: "elInput",
        span: 24,
        type: "textarea",
      },
    ],
  },
];
// // 关联合同
// const relatedContract = [
//   {
//     elCol: [
//       {
//         label: "合同号",
//         prop: "correlationContractCode",
//         tag: "elInput",
//         rules: true,
//       },
//       {
//         label: "供方单位",
//         prop: "venName",
//         tag: "elDialog",
//       },
//       {
//         label: "供方合同金额",
//         prop: "vendorMoney",
//         tag: "elInput",
//         rules: true,
//         rulesName: "decimal",
//       },
//     ],
//   },
// ];
// 保证金、质保金
const secondFormRow = [
  {
    elCol: [
      {
        label: "保证金原币",
        prop: "oriTaxEarnestMoney",
        tag: "elInput",
        rules: true,
        rulesName: "decimal",
      },
      {
        label: "保证金本币",
        prop: "taxEarnestMoney",
        tag: "elInput",
        rules: true,
        rulesName: "decimal",
      },
    ],
  },
  {
    elCol: [
      {
        label: "质保金原币",
        prop: "oriTaxRetentionMoney",
        tag: "elInput",
        rules: true,
        rulesName: "decimal",
      },
      {
        label: "质保金本币",
        prop: "taxRetentionMoney",
        tag: "elInput",
        rules: true,
        rulesName: "decimal",
      },
      {
        label: "质保开始时间",
        prop: "beginDay",
        tag: "elDatePicker",
      },
      {
        label: "质保结束时间",
        prop: "endDay",
        tag: "elDatePicker",
      },
    ],
  },
];
// 项目表头配置
const xmTableColumn = [
  {
    label: "项目编号",
    prop: "billCode",
    tooltip: true,
    width: "100",
  },
  {
    label: "项目名称",
    prop: "projectName",
    tooltip: true,
    width: "150",
  },
  {
    label: "客户编码",
    prop: "cusCode",
    tooltip: true,
    width: "120",
  },
  {
    label: "客户名称",
    prop: "cusName",
    tooltip: true,
    width: "150",
  },
  {
    label: "所属部门",
    prop: "o_OrganName",
    tooltip: true,
  },
  {
    label: "项目类型",
    prop: "email",
    tooltip: true,
  },
  {
    label: "项目阶段",
    prop: "phase",
    tooltip: true,
  },
  {
    label: "项目负责人",
    prop: "p_PersonName",
    tooltip: true,
    width: "120",
  },
  {
    label: "计划开始时间",
    prop: "beginDate",
    tooltip: true,
    width: "120",
  },
  {
    label: "计划结束时间",
    prop: "endDate",
    tooltip: true,
    width: "120",
  },
];
// 客商表头配置
const companyTableColumn = [
  {
    label: "客户编号",
    prop: "cusCode",
    tooltip: true,
    width: "100",
  },
  {
    label: "客户名称",
    prop: "cusName",
    tooltip: true,
    width: "150",
  },
  {
    label: "客户简称",
    prop: "cusShortName",
    tooltip: true,
    width: "120",
  },
  {
    label: "客户分类",
    prop: "cusClassifyName",
    tooltip: true,
    width: "150",
  },
  {
    label: "分管部门",
    prop: "orgainName",
    tooltip: true,
  },
  {
    label: "法人",
    prop: "legalPerson",
    tooltip: true,
  },
  {
    label: "税号",
    prop: "taxNumber",
    tooltip: true,
  },
  {
    label: "电话",
    prop: "telphone",
    tooltip: true,
    width: "110",
  },
  {
    label: "地址",
    prop: "address",
    tooltip: true,
    width: "110",
  },
];
// 项目表头配置
const connection = [
  {
    label: "唯一ID",
    prop: "billid",
    tooltip: true,
    width: "100",
  },
  {
    label: "项目编码",
    prop: "billCode",
    tooltip: true,
    width: "150",
  },
  {
    label: "项目名称",
    prop: "projectName",
    tooltip: true,
    width: "120",
  },
  {
    label: "客户编码",
    prop: "cusCode",
    tooltip: true,
  },
  {
    label: "客户名称",
    prop: "cusName",
    tooltip: true,
  },
  {
    label: "项目阶段",
    prop: "phaseName",
    tooltip: true,
  },
  {
    label: "创建事件",
    prop: "createDate",
    tooltip: true,
  },
  {
    label: "计划开始时间",
    prop: "beginDate",
    tooltip: true,
    width: "120",
  },
  {
    label: "计划结束时间",
    prop: "endDate",
    tooltip: true,
    width: "120",
  },
];
const supplierTableColumn = [
  {
    label: "供货商编码",
    prop: "venCode",
    tooltip: true,
  },
  {
    label: "供货商名称",
    prop: "venName",
    tooltip: true,
  },
  {
    label: "供货商简称",
    prop: "venShortName",
    tooltip: true,
  },
  {
    label: "助记码",
    prop: "zujm",
    tooltip: true,
  },
  {
    label: "客户分类",
    prop: "venClassify",
    tooltip: true,
  },
  {
    label: "分管部门",
    prop: "organID",
    tooltip: true,
  },
  {
    label: "法人",
    prop: "legalPerson",
    tooltip: true,
  },
  {
    label: "税号",
    prop: "taxNumber",
    tooltip: true,
  },
  {
    label: "电话",
    prop: "telphone",
    tooltip: true,
  },
];
// 表单校验
const formVerification = {
  conName: [
    {
      required: true,
      message: "请输入合同名称",
      trigger: "blur",
    },
  ],
  organName: [
    {
      required: true,
      message: "请选择部门",
      trigger: "change, blur",
    },
  ],
  p_PersonName: [
    {
      required: true,
      message: "请选择业务员",
      trigger: "change, blur",
    },
  ],
  versionNo: [
    {
      required: true,
      message: "请输入合同版本号",
      trigger: "blur",
    },
  ],
  cusName: [
    {
      required: true,
      message: "请选择客户",
      trigger: "change, blur",
    },
  ],
  singleDay: [
    {
      required: true,
      message: "请选择签订日期",
      trigger: "blur",
    },
  ],
  beginDay: [
    {
      required: true,
      message: "请选择有效期（起）",
      trigger: "blur",
    },
  ],
  endDay: [
    {
      required: true,
      message: "请选择有效期（止）",
      trigger: "blur",
    },
  ],
};
const salesman = [
  {
    label: "人员编码",
    prop: "p_PersonCode",
    tooltip: true,
  },
  {
    label: "人员姓名",
    prop: "p_PersonName",
    tooltip: true,
  },
  {
    label: "所属部门名称",
    prop: "o_OrganName",
    tooltip: true,
  },
  {
    label: "电话",
    prop: "p_MoiblePhone",
    tooltip: true,
  },
  {
    label: "职位",
    prop: "post",
    tooltip: true,
  },
  {
    label: "手机号",
    prop: "p_Telphone",
    tooltip: true,
  },
  {
    label: "入职日期",
    prop: "p_EntryTime",
    tooltip: true,
  },
];
const roleOptions = [
  {
    label: "超级管理员",
    value: 1,
  },
  {
    label: "业务员",
    value: 2,
  },
  {
    label: "管理员",
    value: 3,
  },
  {
    label: "开发成员",
    value: 4,
  },
  {
    label: "项目经理",
    value: 5,
  },
  {
    label: "实施人员",
    value: 6,
  },
  {
    label: "财务",
    value: 7,
  },
  {
    label: "总经理",
    value: 8,
  },
  {
    label: "副总",
    value: 9,
  },
];
const rules = {
  villageId: [
    {
      required: true,
      message: "请选择村/社区名称",
      trigger: "change",
    },
  ],
  registerTime: [
    {
      required: true,
      message: "请选择登记时间",
      trigger: "change",
    },
  ],
};
// 详情显示图片配置
const showImgJson = {
  span: 24,
  text: "现场照片",
  field: "photoUrls",
};
export default {
  showImgJson,
  topFormRow,
  secondFormRow,
  rules,
  xmTableColumn,
  companyTableColumn,
  supplierTableColumn,
  formVerification,
  connection,
  salesman,
  // relatedContract,
};
